package cn.dnui_wnx725.dnuifood_16110100725.service;

import java.util.List;

import cn.dnui_wnx725.dnuifood_16110100725.bean.CollectBean;
import cn.dnui_wnx725.dnuifood_16110100725.bean.CollectListBean;
import cn.dnui_wnx725.dnuifood_16110100725.bean.FoodBean;
import cn.dnui_wnx725.dnuifood_16110100725.bean.RegistBean;
import cn.dnui_wnx725.dnuifood_16110100725.bean.ShopBean;
import cn.dnui_wnx725.dnuifood_16110100725.bean.UserBean;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;



public interface Service {
    //获取数据的地址
    @GET("userLogin.do")
    Call<UserBean> getLogin(
            @Query("username") String username,
            @Query("userpass") String userpass
    );

    @GET("userRegister.do")
    Call<RegistBean>getRegist(
            @Query("username") String username,
            @Query("userpass") String userpass,
            @Query("mobilenum") String mobilenum,
            @Query("address") String address,
            @Query("comment") String comment
    );

    @GET("getAllShops.do")
    Call<List<ShopBean>>getShop();

    @GET("getFoodByShop.do")
    Call<List<FoodBean>>getFoodbyShop(
            @Query("shop_id") String shop_id
    );

    @GET("getAllUserCollection.do")
    Call<List<CollectListBean>>getCollectlist(
            @Query("user_id") String user_id,
            @Query("flag") String flag
    );

    @GET("userCollectShop.do")
    Call<RegistBean> getCollectShop(
            @Query("user_id") String user_id,
            @Query("shop_id") String shop_id
    );
    @GET("userCollectFood.do")
    Call<RegistBean> getCollectFood(
            @Query("user_id") String user_id,
            @Query("food_id") String food_id
    );

    @GET("isCollected.do")
    Call<CollectBean> getisCollected(
            @Query("user_id") String user_id,
            @Query("shop_food_id") String  shop_food_id,
            @Query("flag") String flag
    );

    @GET("getFoodBySearch.do")
    Call<List<FoodBean>> getSeacrhFood(
            @Query("search") String search
    );

    @GET("updateUserById.do")
    Call<RegistBean> UpdateInfo(
            @Query("user_id") String user_id,
            @Query("username") String username,
            @Query("userpass") String userpass,
            @Query("mobilenum") String mobilenum,
            @Query("address") String address
    );

}
